<script>
	import {
		mapMutations
	} from 'vuex';
	export default {
		methods: {
			...mapMutations(['userLogin'])
		},
		onLaunch: function() {
			let userInfo = uni.getStorageSync('userInfo') || '',
				_this = this;
			if (userInfo.access_token) {
				uni.getStorage({
					key: 'userInfo',
					success(res) {
						_this.userLogin(res.data)
					}
				})
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import 'static/icon.css'
</style>
